fix to avoid flicker at begin/end of list
authorLars Hamann <lars@src.gnome.org>
Fri, 17 Jul 1998 16:05:42 +0000 (16:05 +0000)
committerLars Hamann <lars@src.gnome.org>
Fri, 17 Jul 1998 16:05:42 +0000 (16:05 +0000)
* gtk/gtkclist.c (scroll_vertical): fix to avoid flicker at begin/end
  of list

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkclist.c

index 6633e39bc652f02c064f99c836e60ceab8ab669b..25444e512ea598bb87a86eabf35f918f925c31b6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Jul 17 17:54:02 1998  Lars Hamann  <lars@gtk.org>
+
+       * gtk/gtkclist.c (scroll_vertical): fix to avoid flicker at begin/end
+       of list
+
 Fri Jul 17 05:30:47 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtksignal.c (gtk_handlers_run) (gtk_signal_real_emit):
@@ -32,6 +37,7 @@ Thu Jul 16 14:16:16 PDT 1998 Manish Singh <yosh@gimp.org>
        it; --libs strips out redundant -L<path>'s properly (there was
        code in there to do it before, but it didn't work)
 
+>>>>>>> 1.528
 Thu Jul 16 18:24:41 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtknotebook.h: 
index 6633e39bc652f02c064f99c836e60ceab8ab669b..25444e512ea598bb87a86eabf35f918f925c31b6 100644 (file)
@@ -1,3 +1,8 @@
+Fri Jul 17 17:54:02 1998  Lars Hamann  <lars@gtk.org>
+
+       * gtk/gtkclist.c (scroll_vertical): fix to avoid flicker at begin/end
+       of list
+
 Fri Jul 17 05:30:47 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtksignal.c (gtk_handlers_run) (gtk_signal_real_emit):
@@ -32,6 +37,7 @@ Thu Jul 16 14:16:16 PDT 1998 Manish Singh <yosh@gimp.org>
        it; --libs strips out redundant -L<path>'s properly (there was
        code in there to do it before, but it didn't work)
 
+>>>>>>> 1.528
 Thu Jul 16 18:24:41 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtknotebook.h: 
index 6633e39bc652f02c064f99c836e60ceab8ab669b..25444e512ea598bb87a86eabf35f918f925c31b6 100644 (file)
@@ -1,3 +1,8 @@
+Fri Jul 17 17:54:02 1998  Lars Hamann  <lars@gtk.org>
+
+       * gtk/gtkclist.c (scroll_vertical): fix to avoid flicker at begin/end
+       of list
+
 Fri Jul 17 05:30:47 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtksignal.c (gtk_handlers_run) (gtk_signal_real_emit):
@@ -32,6 +37,7 @@ Thu Jul 16 14:16:16 PDT 1998 Manish Singh <yosh@gimp.org>
        it; --libs strips out redundant -L<path>'s properly (there was
        code in there to do it before, but it didn't work)
 
+>>>>>>> 1.528
 Thu Jul 16 18:24:41 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtknotebook.h: 
index 6633e39bc652f02c064f99c836e60ceab8ab669b..25444e512ea598bb87a86eabf35f918f925c31b6 100644 (file)
@@ -1,3 +1,8 @@
+Fri Jul 17 17:54:02 1998  Lars Hamann  <lars@gtk.org>
+
+       * gtk/gtkclist.c (scroll_vertical): fix to avoid flicker at begin/end
+       of list
+
 Fri Jul 17 05:30:47 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtksignal.c (gtk_handlers_run) (gtk_signal_real_emit):
@@ -32,6 +37,7 @@ Thu Jul 16 14:16:16 PDT 1998 Manish Singh <yosh@gimp.org>
        it; --libs strips out redundant -L<path>'s properly (there was
        code in there to do it before, but it didn't work)
 
+>>>>>>> 1.528
 Thu Jul 16 18:24:41 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtknotebook.h: 
index 6633e39bc652f02c064f99c836e60ceab8ab669b..25444e512ea598bb87a86eabf35f918f925c31b6 100644 (file)
@@ -1,3 +1,8 @@
+Fri Jul 17 17:54:02 1998  Lars Hamann  <lars@gtk.org>
+
+       * gtk/gtkclist.c (scroll_vertical): fix to avoid flicker at begin/end
+       of list
+
 Fri Jul 17 05:30:47 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtksignal.c (gtk_handlers_run) (gtk_signal_real_emit):
@@ -32,6 +37,7 @@ Thu Jul 16 14:16:16 PDT 1998 Manish Singh <yosh@gimp.org>
        it; --libs strips out redundant -L<path>'s properly (there was
        code in there to do it before, but it didn't work)
 
+>>>>>>> 1.528
 Thu Jul 16 18:24:41 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtknotebook.h: 
index 6633e39bc652f02c064f99c836e60ceab8ab669b..25444e512ea598bb87a86eabf35f918f925c31b6 100644 (file)
@@ -1,3 +1,8 @@
+Fri Jul 17 17:54:02 1998  Lars Hamann  <lars@gtk.org>
+
+       * gtk/gtkclist.c (scroll_vertical): fix to avoid flicker at begin/end
+       of list
+
 Fri Jul 17 05:30:47 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtksignal.c (gtk_handlers_run) (gtk_signal_real_emit):
@@ -32,6 +37,7 @@ Thu Jul 16 14:16:16 PDT 1998 Manish Singh <yosh@gimp.org>
        it; --libs strips out redundant -L<path>'s properly (there was
        code in there to do it before, but it didn't work)
 
+>>>>>>> 1.528
 Thu Jul 16 18:24:41 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtknotebook.h: 
index 6633e39bc652f02c064f99c836e60ceab8ab669b..25444e512ea598bb87a86eabf35f918f925c31b6 100644 (file)
@@ -1,3 +1,8 @@
+Fri Jul 17 17:54:02 1998  Lars Hamann  <lars@gtk.org>
+
+       * gtk/gtkclist.c (scroll_vertical): fix to avoid flicker at begin/end
+       of list
+
 Fri Jul 17 05:30:47 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtksignal.c (gtk_handlers_run) (gtk_signal_real_emit):
@@ -32,6 +37,7 @@ Thu Jul 16 14:16:16 PDT 1998 Manish Singh <yosh@gimp.org>
        it; --libs strips out redundant -L<path>'s properly (there was
        code in there to do it before, but it didn't work)
 
+>>>>>>> 1.528
 Thu Jul 16 18:24:41 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtknotebook.h: 
index 07bba37c4023e6f60835dbf52ce2d166d0ce8c81..bf67c5760d7835cd06a93d02eed7eeb2291408d5 100644 (file)
@@ -5220,6 +5220,8 @@ scroll_vertical (GtkCList      *clist,
                 GtkScrollType  scroll_type,
                 gfloat         position)
 {
+  gint old_focus_row;
+
   g_return_if_fail (clist != NULL);
   g_return_if_fail (GTK_IS_CLIST (clist));
 
@@ -5231,16 +5233,23 @@ scroll_vertical (GtkCList      *clist,
     case GTK_SELECTION_EXTENDED:
       if (clist->anchor >= 0)
        return;
-      if (!GTK_CLIST_ADD_MODE (clist))
-       gtk_clist_unselect_all (clist);
 
     case GTK_SELECTION_BROWSE:
 
-      if (clist->selection_mode == GTK_SELECTION_BROWSE)
-       unselect_row (clist,clist->focus_row, -1, NULL);
-
+      old_focus_row = clist->focus_row;
       move_focus_row (clist, scroll_type, position);
 
+      if (old_focus_row != clist->focus_row)
+       {
+         if (clist->selection_mode == GTK_SELECTION_BROWSE)
+           unselect_row (clist,old_focus_row, -1, NULL);
+         else if (!GTK_CLIST_ADD_MODE (clist))
+           {
+             gtk_clist_unselect_all (clist);
+             clist->undo_anchor = old_focus_row;
+           }
+       }
+
       if (clist->selection_mode == GTK_SELECTION_EXTENDED &&
          GTK_CLIST_ADD_MODE (clist))
        return;
@@ -5248,7 +5257,8 @@ scroll_vertical (GtkCList      *clist,
       switch (gtk_clist_row_is_visible (clist, clist->focus_row))
        {
        case GTK_VISIBILITY_NONE:
-         select_row (clist, clist->focus_row, -1, NULL);
+         if (old_focus_row != clist->focus_row)
+           select_row (clist, clist->focus_row, -1, NULL);
          switch (scroll_type)
            {
            case GTK_SCROLL_STEP_BACKWARD:
@@ -5286,7 +5296,8 @@ scroll_vertical (GtkCList      *clist,
            }
 
        default:
-         select_row (clist, clist->focus_row, -1, NULL);
+         if (old_focus_row != clist->focus_row)
+           select_row (clist, clist->focus_row, -1, NULL);
          break;
        }
       break;